package cn.factorybox.model.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.Date;
import java.util.List;

/**
 * @author flypig
 * @version 1.0
 * @date 2020-09-10 13:54
 */
public class FactoryDevice {

    private static final long serialVersionUID = 1L;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String id;      //设备id
    private String value;      //设备编号
    private String name;      //设备名称

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer index;     // 查询结果的序号

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String number;     // 房间顺序编号，用于生成设备编号名称

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String room;     // 所属房间名称

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String roomId;     // 所属房间id

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer star;      // 关注度，1~5，若传的数据不是这个范围记得不执行并返回错误

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String iCount;      // 设备类型

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private boolean online;      // 设备在线状态，判断依据为前两分钟内有没有数据

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String type;    // 设备状态，可选值：'normal'、'warning'、'offline'

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty("data")
    private List<Double> dataList;   // 最新16条温度数据数组

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createTime;      //创建时间

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRoom() {
        return room;
    }

    public void setRoom(String room) {
        this.room = room;
    }

    public String getRoomId() {
        return roomId;
    }

    public void setRoomId(String roomId) {
        this.roomId = roomId;
    }

    public Integer getStar() {
        return star;
    }

    public void setStar(Integer star) {
        this.star = star;
    }

    public String getiCount() {
        return iCount;
    }

    public void setiCount(String iCount) {
        this.iCount = iCount;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public boolean isOnline() {
        return online;
    }

    public void setOnline(boolean online) {
        this.online = online;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public List<Double> getDataList() {
        return dataList;
    }

    public void setDataList(List<Double> dataList) {
        this.dataList = dataList;
    }
}
